'This is used in the ''commonAncestor'' method of RootMode to take care of the problem that a rootMode doesn''t have a parent. The pseudo mode is used in generating and processing the enter/leave mode events.'!
'I am the real root of the MMS mode hierarchy. My super class is a View1 which is very different than an ordinary View.'!
!RootMode methodsFor: 'initialize-release'!
initialize
super initialize.
self insideColor: Form white.! !
!RootMode methodsFor: 'layering'!
computeLayering
"The superView of me is a StandardSystemView which doesn't know the layering relation. Don't ask it for the obscuringRects."
" Shan April 8, 1989"
self computeSubLayering! !
!RootMode methodsFor: 'tracking/replay'!
eventQueue
"For tracking and replay. Shan 13 July 1990"
eventQueue isNil
ifTrue: [^EventQ]
ifFalse: [^eventQueue]!
eventQueue: aQ
"For tracking and replay. Shan 13 July 1990"
eventQueue _ aQ! !
!RootMode methodsFor: 'startUp/stopRunning'!
startUp
"This is the place to crank up the MMS."
"Use 'self close. self controlTreminate' in debugger with
MMSStdSysController selected to terminate the stray process."
"Initialize the private response dict of each controller class. Shan
May 24, 1989"
MController initAllERDict.
MMSStdSysView startUp: self!
stopRunning
superView controller close.
"self eventQueue flush Shan 19 July 1990"
"running _ false."! !
!RootMode methodsFor: 'enter/leaveEvent-process'!
commonAncestor
"RootMode is a special case. It does not have a superMode (the
environment polling view doesn't count). A pseudo superMode is
returned to keep the algorithm from handling the special case."
"Shan Mrach 15, 1989"
cursorIn
ifTrue: [^self]
ifFalse: ["We come to here only when the previous cursor point is
outside the rootMode and the current point is inside. That is
the cursor moves from out of rootMode into it."
^PseudoAncestorMode newWith: self]! !
!RootMode methodsFor: 'superMode access'!
isTopMode
"Shan Mrach 17, 1989"
^ true!
topMode
"Shan Mrach 17, 1989"
^self! !
!RootMode methodsFor: 'displaying'!
display
"The logic that cuts down the recursion when self is not visible is
added."
" Shan March 19, 1989"
self map.
self displayIn: nil! !
!RootMode methodsFor: 'label access'!
label
"Shan April 26, 1989"
^ label!
label: aString
"Shan April 26, 1989"
^ label _ aString! !
!RootMode methodsFor: 'sizing'!
edit
"There will be a circular structure here. See the code in Mode>edit.
RootMode must be visible. Otherwise no event will be processed.
Shan September 16, 1989"
super edit.
visible _ true!
maximumSize
"Answer a point representing the maximum width and height of the
receiver. Shan April 26, 1989"
^maximumSize!
maximumSize: aPoint
"Set the argument, aPoint, to be the maximum width and height of the receiver."
maximumSize _ aPoint!
minimumSize
"Answer a point representing the minimum width and height of the receiver."
^minimumSize!
minimumSize: aPoint
"Set the argument, aPoint, to be the minimum width and height of the receiver."
minimumSize _ aPoint! !
!RootMode methodsFor: 'private'!
setVisible: aBool
"This is override to handle the Smallatlk window mengement stuff. The MMSStdSysController use this message to disable the process of events in RootMode. Shan April 26, 1989"
'In the eventResponses dictionary there are 3 kinds of values:
#self is for system private use. It means the message selector is implemented in this class. This is for some of the special class.
#Xxx Symbols that start with a capital letter denote library behaviors provided by the system.
#xxx Symbols that start with small case letter denote messages for the model. The model will be sent a message with the selector #xxx with the event as an argument.
Shan May 24, 1989
The intance variable ''eventResponses'' is put in to reserve the ability of changing both a single instance (eg. a customized button) and all instances (eg. all network nodes) of a class. Shan May 25, 1989'!